﻿using Caliburn.Micro;
using MvvmEx.Enums;
using Action = System.Action;

namespace MvvmEx.Controls.Messager
{
    /// <summary>
    /// 提示消息
    /// </summary>
    public class NotifyMsg : PropertyChangedBase
    {
        private string _title;
        private string _content;
        private NotifyMsgStatusDefine _status = NotifyMsgStatusDefine.WaitToShow;

        public string Title
        {
            get { return _title; }
            set
            {
                if (value == _title) return;
                _title = value;
                NotifyOfPropertyChange(() => Title);
            }
        }

        public string Content
        {
            get { return _content; }
            set
            {
                if (value == _content) return;
                _content = value;
                NotifyOfPropertyChange(() => Content);
            }
        }

        public NotifyMsgStatusDefine Status
        {
            get { return _status; }
            set
            {
                if (value == _status) return;
                _status = value;
                NotifyOfPropertyChange(() => Status);
            }
        }

        public string OkText { get; set; }

        public string DelText { get; set; }

        public Action OkAction { get; set; }

        public Action DelAction { get; set; }

        public NotifyMsg()
        {
            OkText = "查看";

            DelText = "删除";
        }
    }
}